package com.ybg.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ybg.service.SchoolService;

/**
 * 学校相关
 * 1、【官网】开通申请
 * @author	jade
 * @since	2017年3月31日
 */
@Controller
public class SchoolController {
	@Autowired
	private SchoolService schoolService;
	
	
	/**
	 * 提交【官网】开通申请的表单信息
	 * @param schoolName
	 * @param userName
	 * @param userId
	 * @param mobile
	 * @param qq
	 * @param applyReason
	 * @param email
	 * @param apartment
	 * @return
	 */
	@RequestMapping(value="/school/officialWebsiteApply", method=RequestMethod.GET)
	@ResponseBody
	public String officialWebsiteApply(@RequestParam(value ="schoolName") String schoolName,
			@RequestParam(value ="userName") String userName,
			@RequestParam(value ="userId", required = false, defaultValue = "") String userId,
			@RequestParam(value ="mobile") String mobile,
			@RequestParam(value ="qq", required = false, defaultValue = "") String qq,
			@RequestParam(value ="applyReason") String applyReason,
			@RequestParam(value ="email", required = false, defaultValue = "") String email,
			@RequestParam(value ="department", required = false, defaultValue = "") String department, 
			@RequestParam(value = "callback", required = false, defaultValue = "")String callback){
		
		
		return schoolService.officialWebsiteApply(schoolName, userName, userId, mobile, qq, applyReason, email, department, callback);
	}
}
